package com.czwx.bee.base.common.utils;

import com.czwx.bee.base.common.interfaces.ShopOrderStatusEnum;

/**
 * @Author:wiki
 * @Date:Create in 2018/7/17 0017 上午 9:54
 */
public class ShopOrderUtil {

    public static String getOrderStateStr(Integer state){
        if(state==18||state==20){
            //已申请(审核中) 18 20
           return ShopOrderStatusEnum.HAS_APPLY.getMsg();

        }else if(state==27||state==19) {
          //审核不通过
           return ShopOrderStatusEnum.REFUSED.getMsg();
        }else if(state==21||state==22||state==26){
            //待放款   21 22 26
            return ShopOrderStatusEnum.WAIT_LOAN.getMsg();
        }
        else if(state==29){
            //待提现  29
            return ShopOrderStatusEnum.WAIT_TIXIAN.getMsg();
        }
        else if(state==30){
            //待还款 30
            return ShopOrderStatusEnum.WAIT_REPAY.getMsg();
        }
        else if(state==40){
            //已结清
            return ShopOrderStatusEnum.Settle.getMsg();
        }
        else if(state==50){
            //逾期
            return ShopOrderStatusEnum.OVERDUE.getMsg();
        }
        return null;
    }

    public static  String getOrderStates(Integer shopOrderStatus){
           if(shopOrderStatus==ShopOrderStatusEnum.HAS_APPLY.getCode()){
            return "18,20";
           }else if(shopOrderStatus==ShopOrderStatusEnum.WAIT_LOAN.getCode()){
            return "21,22,26";
           }
           else if(shopOrderStatus==ShopOrderStatusEnum.WAIT_TIXIAN.getCode()){
               return "29";
           }
           else if(shopOrderStatus==ShopOrderStatusEnum.WAIT_REPAY.getCode()){
               return "30";
           }

           else if(shopOrderStatus==ShopOrderStatusEnum.REFUSED.getCode()){
               return "19,27";
           }

           else if(shopOrderStatus==ShopOrderStatusEnum.Settle.getCode()){
               return "40";
           }

           else if(shopOrderStatus==ShopOrderStatusEnum.OVERDUE.getCode()){
               return "50";
           }
        return null;
    }
}
